@import 'nprogress/nprogress.css';
@import './docssearch.css';

:root {
  --c-bg: #fff;
  --c-scrollbar: #eee;
  --c-scrollbar-hover: #bbb;
  --c-hover-color: #000;
  --c-demo-card-bg: #fffdfd;
  --c-logo-fill-color: #000;
}

html {
  background-color: var(--c-bg);
  overflow-x: hidden;
  overflow-y: scroll;
}

html.dark {
  --c-bg: #050505;
  --c-scrollbar: #111;
  --c-scrollbar-hover: #222;
  --c-hover-color: #fff;
  --c-demo-card-bg: #050303;
  --c-logo-fill-color: #fff;
}

a:hover {
  color: var(--c-hover-color);
}

a {
  color: var(--fg-deeper);
  text-decoration: none;
  font-weight: 500;
}

body {
  margin: 0;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

button:hover {
  border-color: var(--c-hover-color);
}

button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

.card {
  padding: 2em;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-old(root) {
  z-index: 1;
}

::view-transition-new(root) {
  z-index: 9999;
}

.dark::view-transition-old(root) {
  z-index: 9999;
}

.dark::view-transition-new(root) {
  z-index: 1;
}

#nprogress .bar {
  background: #888;
}

.dark #nprogress .bar {
  background: #fff;
}

#nprogress .peg {
  background: #888;
  box-shadow:
    0 0 10px #888,
    0 0 5px #888;
}

@keyframes slide-enter {
  0% {
    transform: translateY(10px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 跟随你的系统偏好设置 */
@media (prefers-reduced-motion: no-preference) {
  html:not(.no-sliding) [slide-enter],
  html:not(.no-sliding) .slide-enter,
  html:not(.no-sliding) .slide-enter-content > *:not(:has(.table-of-contents)) {
    --enter-stage: 0;
    --enter-step: 90ms;
    --enter-initial: 0ms;
    animation: slide-enter 1s both 1;
    animation-delay: calc(var(--enter-initial) + var(--enter-stage) * var(--enter-step));
  }

  .slide-enter-content > *:nth-child(1) {
    --enter-stage: 1 !important;
  }

  .slide-enter-content > *:nth-child(2) {
    --enter-stage: 2 !important;
  }

  .slide-enter-content > *:nth-child(3) {
    --enter-stage: 3 !important;
  }

  .slide-enter-content > *:nth-child(4) {
    --enter-stage: 4 !important;
  }

  .slide-enter-content > *:nth-child(5) {
    --enter-stage: 5 !important;
  }

  .slide-enter-content > *:nth-child(6) {
    --enter-stage: 6 !important;
  }

  .slide-enter-content > *:nth-child(7) {
    --enter-stage: 7 !important;
  }

  .slide-enter-content > *:nth-child(8) {
    --enter-stage: 8 !important;
  }

  .slide-enter-content > *:nth-child(9) {
    --enter-stage: 9 !important;
  }

  .slide-enter-content > *:nth-child(10) {
    --enter-stage: 10 !important;
  }

  .slide-enter-content > *:nth-child(11) {
    --enter-stage: 11 !important;
  }

  .slide-enter-content > *:nth-child(12) {
    --enter-stage: 12 !important;
  }

  .slide-enter-content > *:nth-child(13) {
    --enter-stage: 13 !important;
  }

  .slide-enter-content > *:nth-child(14) {
    --enter-stage: 14 !important;
  }

  .slide-enter-content > *:nth-child(15) {
    --enter-stage: 15 !important;
  }

  .slide-enter-content > *:nth-child(16) {
    --enter-stage: 16 !important;
  }

  .slide-enter-content > *:nth-child(17) {
    --enter-stage: 17 !important;
  }

  .slide-enter-content > *:nth-child(18) {
    --enter-stage: 18 !important;
  }

  .slide-enter-content > *:nth-child(19) {
    --enter-stage: 19 !important;
  }

  .slide-enter-content > *:nth-child(20) {
    --enter-stage: 20 !important;
  }
}

/* 文字选中颜色 */
::selection {
  background: #8884;
}

.i-icon-park-outline-english {
  --un-icon: url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 48 48' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='4'%3E%3Crect width='36' height='36' x='6' y='6' rx='3'/%3E%3Cpath d='M13 31V17h8m-8 7h7.5M13 31h7.5m5.5 0V19m0 12v-6.5a4.5 4.5 0 0 1 4.5-4.5v0a4.5 4.5 0 0 1 4.5 4.5V31'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask: var(--un-icon) no-repeat;
  mask: var(--un-icon) no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  background-color: currentColor;
  color: inherit;
  width: 1.2em;
  height: 1.2em;
  vertical-align: middle;
  margin-top: 0.2em;
}

.i-icon-park-outline-chinese {
  --un-icon: url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 48 48' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-width='4'%3E%3Crect width='36' height='36' x='6' y='6' stroke-linejoin='round' rx='3'/%3E%3Cpath stroke-linejoin='round' d='M14 18h20v10H14z'/%3E%3Cpath d='M24 14v21'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask: var(--un-icon) no-repeat;
  mask: var(--un-icon) no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  background-color: currentColor;
  color: inherit;
  width: 1.2em;
  height: 1.2em;
  vertical-align: middle;
  margin-top: 0.2em;
}

/* Chrome浏览器 */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(121, 119, 119, 0.5);
  border-radius: 10px;
}

::-webkit-scrollbar-track {
  background-color: #f1f1f1;
}

/* Firefox浏览器 */
html,
div,
pre,
p,
tbody {
  scrollbar-width: thin;
  scrollbar-color: rgba(121, 119, 119, 0.5) #f1f1f1;
}

.v-popper__inner {
  font-size: 0.8rem !important;
}

.dark .v-popper--theme-dropdown .v-popper__inner {
  background: #2c2d2ce4;
  color: #fff;
  border-radius: 6px;
  border: 1px solid #dddddd2a;
  box-shadow: 0 6px 30px #0000001a;
}

.dark .v-popper__arrow-inner {
  display: none;
}

.dark .v-popper__arrow-outer {
  border-color: #999;
}

.table-of-contents {
  cursor: pointer;
}

.mermaid svg {
  margin: 0 auto;
}
